package day0813;

/**
 * @Author:galaxy_yan
 * @Date: 2022/8/14
 * @Time: 10:25
 * @Description
 * 作业标题(1694)
 * 递归求和
 */
public class text2 {
    public static void main(String[] args) {
        System.out.println(sum(100));
    }
    public static int sum(int n){
        if(1==n){
            return 1;
        }
        return n+sum(n-1);
    }
}
